package svc

import (
	"gorm.io/gorm"
	"gozeroProject/model"
	"gozeroProject/rpc/internal/config"
)

type ServiceContext struct {
	Config config.Config

	DB *gorm.DB
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,

		DB: model.InitGorm(c.Mysql.DataSource),
	}
}
